package com.shujia.java.day13.demo5;

public class StudentTest {
    public static void main(String[] args) {
        //创建学生
        Student student = new Student();
        student.setName("张三");
        //创建StudentModel
        StudentModel<Student> studentStudentModel = new StudentModel<Student>();
        studentStudentModel.setStudent(student);
        //使用泛型之后 直接转型为限定类型
        Student s=studentStudentModel.getStudent();
        System.out.println(s.getName());
    }
}
